package com.seele.tigerwallet.ui.activtiy;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.seele.tigerwallet.R;
import com.seele.tigerwallet.ui.base.TitleBaseActivity;
import com.seele.tigerwallet.ui.views.LinearRelativeLayout;

/**
 * Description:英文
 * Data: 2018/6/11 19:44
 * author: 
 */
public class LanguageSelectActivity extends TitleBaseActivity implements View.OnClickListener {


    private LinearRelativeLayout  mLanguageZhRv;
    private LinearRelativeLayout  mLanguageZhRcnRv;
    private LinearRelativeLayout  mLanguageEnRv;

    private ImageView mZhImg;
    private ImageView mZhRcnImg;
    private ImageView mEnimg;


    @Override
    public int getContainerViewId() {
        return R.layout.activity_language_select;
    }

    @Override
    protected void initView() {
        setTitle(R.string.language_select);
        mLanguageZhRv=$f(R.id.language_zh_rv);
        mLanguageZhRcnRv=$f(R.id.language_zh_rcn_rv);
        mLanguageEnRv=$f(R.id.language_en_rv);
        mZhImg=$f(R.id.zh_img);
        mZhRcnImg=$f(R.id.zh_rcn_img);
        mEnimg=$f(R.id.en_img);
        mLanguageZhRv.setOnClickListener(this);
        mLanguageZhRcnRv.setOnClickListener(this);
        mLanguageEnRv.setOnClickListener(this);
        resetView();


    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.language_zh_rv://中文
                resetView();
                mZhImg.setVisibility(View.VISIBLE);
                break;
            case R.id.language_zh_rcn_rv://繁体
                resetView();
                mZhRcnImg.setVisibility(View.VISIBLE);
                break;
            case R.id.language_en_rv://英文
                resetView();
                mZhImg.setVisibility(View.VISIBLE);
                break;
        }

    }

    private void resetView() {
        mZhImg.setVisibility(View.GONE);
        mZhRcnImg.setVisibility(View.GONE);
        mEnimg.setVisibility(View.GONE);
    }
}
